
local skill = fk.CreateSkill {
  name = "#lvshi__shensu_viewas",
}

skill:addEffect("viewas", {
  mute = true,
  interaction = function(self, player)
    local all_choices = {"$Judge", "$Hand", "$Equip"}
    local choices = table.simpleClone(all_choices)
    if player:isKongcheng() then table.removeOne(choices, "$Hand") end
    if #player:getCardIds("e") == 0 then table.removeOne(choices, "$Equip") end
    if #player:getCardIds("j") == 0 then table.removeOne(choices, "$Judge") end
    return UI.ComboBox {choices = choices, all_choices = all_choices }
  end,
  card_filter = Util.FalseFunc,
  view_as = function(self, cards)
    if #cards ~= 0 or not self.interaction.data then return end
    local card = Fk:cloneCard("lvs_thunder__slash")
    card.skillName = "lvshi__shensu"
    return card
  end,
})

return skill
